package com.qf.service;

import com.qf.entity.Medicineii;
import com.qf.pojo.BaseResult;
import com.qf.service.fallback.MedicineFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "HOSPITAL-MEDICINE",path = "/medicine",fallback = MedicineFallBack.class)
public interface MedicineService {

    @RequestMapping(value = "/findAllMedicineInfo",method = RequestMethod.GET)
    public BaseResult findAllMedicineInfo(@RequestParam("page")Integer page, @RequestParam("size")Integer size, @RequestParam("name")String name);

    @RequestMapping(value = "/findByIdMedicine",method = RequestMethod.GET)
    public BaseResult findByIdMedicine(@RequestParam(value="midi") Integer midi);

    @RequestMapping(value = "/addMedicine",method = RequestMethod.POST)
    public BaseResult addMedicine(@RequestBody Medicineii medicineii);

    @RequestMapping(value = "/updateMedicine",method = RequestMethod.PUT)
    public BaseResult updateMedicine(@RequestBody Medicineii medicineii);

    @RequestMapping(value = "/deleteMedicineById/{midii}",method = RequestMethod.DELETE)
    public BaseResult deleteMedicineById(@PathVariable("midii")Integer midii);
}
